package com.bdqn.bookweb.pojo;

public class Page {
	private int currPageNo;
	private int pageSize = 2;
	private int totalCount;
	private int totalPage;
	public int getCurrPageNo() {
		return currPageNo;
	}
	public void setCurrPageNo(int currPageNo) {
		this.currPageNo = currPageNo;
	}
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	public int getTotalCount() {
		return totalCount;
	}
	//总条数
	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
		if(totalCount>0){
			//计算总页数
			this.totalPage = ((this.totalCount % this.pageSize == 0) ?
							 (this.totalCount / this.pageSize) :
							 (this.totalCount / pageSize + 1)) ;
		}
	}
	public int getTotalPage() {
		return totalPage;
	}
	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}
	private String test;
}
